<extend name="Public/base" />

<!-- 桌面商家新增和编辑页面 -->
<block name="body">
  <div class="main-title">
    <h2>{$data['id']?'编辑':'新增'}秒杀活动</h2>
  </div>

  <form action="{:U('update')}" enctype="application/x-www-form-urlencoded" method="POST" class="form-horizontal">
    <div class="form-item">
      <label for="auth-title" class="item-label">秒杀活动名称</label>
      <div class="controls">
        <input id="auth-title" type="text" name="name" class="text input-large" disabled="true" value="{$list.name}"/>
      </div>
    </div>
    <div class="form-item">
      <label for="auth-title" class="item-label">活动商品</label>
     <!-- 秒杀价:        <input id="item_price" type="text" name="item_price" class="text input" value=" "/>-->

      <div class="controls">
        {:hook('itemSel', array('name' => 'item_ids', 'items' => $data['item_ids'],'store_id'=> $store_id ,'show' => 1,'active'=> 'seckill'))}
      </div>
    </div>
      <div class="form-item">
      <label for="auth-title" class="item-label">活动时间</label>
      <div class="controls">
        <input type="text" name="start_time" class="text date_select" value="{:$list['start_time'] ? time_format($list['start_time'], 'Y-m-d H:i:s'): null }"   disabled="true" placeholder="开始时间"/>
        至
        <input type="text" name="expire_time" class="text date_select" value="{:$list['expire_time'] ? time_format($list['expire_time'], 'Y-m-d H:i:s') : null}" disabled="true" placeholder="结束时间"/>
      </div>
    </div>
    <div class="form-item">
      <input type="hidden" name="start_time" value="{:$list['start_time'] ? time_format($list['start_time'], 'Y-m-d H:i:s'): null }" />
      <input type="hidden" name="expire_time" value="{:$list['expire_time'] ? time_format($list['expire_time'], 'Y-m-d H:i:s') : null}" />
      <input type="hidden" name="id" value="{$data.id}" />
      <input type="hidden" name="name" value="{$list.name}" />
      <input type="hidden" name="store_id" value="{$store_id}">
      <input type="hidden" name="item_num" value="{$list.item_num}">
      <input type="hidden" name="act_id" value="{$act_id}">
      <button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button>
      <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
  </form>
  <block>


    <block name="script">
      <script language="javascript" type="text/javascript" src="__PUBLIC__/Admin/js/My97Date/WdatePicker.js"></script>
      <script type="text/javascript" charset="utf-8">
          $(function(){
              //导航高亮
              highlight_subnav("{:U('Seckill/activity')}");
              //时间选择
              $('.date_select').focus(function(){
                  WdatePicker({skin: 'twoer', dateFmt: 'yyyy-MM-dd HH:mm:ss'});
              });
          });
      </script>
    </block>
